//
//  BCApplicationInfoViewModel+Source.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2019/1/16.
//  Copyright © 2019 guoshikeji. All rights reserved.
//

#import "BCApplicationInfoViewModel+Source.h"

@implementation BCApplicationInfoViewModel (Source)

+ (NSMutableArray *)registerCells {
    NSMutableArray *cells = [NSMutableArray array];
    [cells addObject:NSStringFromClass(BCApplicationBaseCell.class)];
    [cells addObject:NSStringFromClass(BCApplicationInfomationCell.class)];
    [cells addObject:NSStringFromClass(BCApplicationVersionIconCell.class)];
    [cells addObject:NSStringFromClass(BCApplicationInfomationArrowCell.class)];
    return cells;
}

/**
 应用icon、版本、构建版本信息
 */
+ (BCApplicationInfoCellModel *)versionCellModel {
    BCApplicationInfoCellModel *model = [BCApplicationInfoCellModel new];
    model.cellClass = BCApplicationVersionIconCell.class;
    return model;
}
/**
 版本更新
 */
+ (BCApplicationInfoCellModel *)versionUpdate {
    BCApplicationInfoCellModel *model = [BCApplicationInfoCellModel new];
    model.cellClass = BCApplicationInfomationArrowCell.class;
    model.titleKey = @"Version Update";
    model.cellType = BCApplicationInfoCellTypeVersionUpdate;
    return model;
}

#pragma mark - device
/**
 设备别名
 */
+ (BCApplicationInfoCellModel *)deviceAlias {
    BCApplicationInfoCellModel *model = [BCApplicationInfoCellModel new];
    model.cellClass = BCApplicationInfomationCell.class;
    model.titleKey = @"Device Alias";
    NSString *alias = [GeneralParameterManager sharedGeneral].aliasName;
    model.detailsContent = alias.length?alias:@"--";
    return model;
}
/**
 设备系统
 */
+ (BCApplicationInfoCellModel *)deviceSystem {
    BCApplicationInfoCellModel *model = [BCApplicationInfoCellModel new];
    model.cellClass = BCApplicationInfomationCell.class;
    model.titleKey = @"Device System";
    //
    NSString *systemName = [GeneralParameterManager sharedGeneral].deviceSystemName;
    NSString *versionNumber = [GeneralParameterManager sharedGeneral].deviceSystemVersion;
    //
    model.detailsContent = [NSString stringWithFormat:@"%@ %@",systemName,versionNumber];
    return model;
}
/**
 设备型号
 */
+ (BCApplicationInfoCellModel *)deviceModel {
    BCApplicationInfoCellModel *model = [BCApplicationInfoCellModel new];
    model.cellClass = BCApplicationInfomationCell.class;
    model.titleKey = @"Device Model";
    model.detailsContent = [GeneralParameterManager sharedGeneral].deviceModel;
    return model;
}
/**
 设备码
 */
+ (BCApplicationInfoCellModel *)deviceUUID {
    BCApplicationInfoCellModel *model = [BCApplicationInfoCellModel new];
    model.cellClass = BCApplicationInfomationCell.class;
    model.titleKey = @"Device UUID";
    model.detailsContent = [GeneralParameterManager sharedGeneral].uuid;
    return model;
}

@end
